﻿Public Class page1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        lbl_sum.Text = getCalc(tb_FirstNumber.Text, tb_SecondNumber.Text)

    End Sub

    Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles tb_FirstNumber.TextChanged

    End Sub

    Private Function getCalc(ByVal FirstNumberStr As String, ByVal SecondNumberStr As String) As String
        Dim FirstNumber, SecondNumber As Single
        FirstNumber = CSng(FirstNumberStr)
        SecondNumber = CSng(SecondNumberStr)
        Dim result As Single
        result = FirstNumber + SecondNumber
        Return CStr(result)
    End Function


End Class